<template>

  <router-view v-if="isRouterAlive"></router-view>
</template>

<script>
import {nextTick, provide, ref} from "vue"

export default {
  name:"App",
  setup(){
    const isRouterAlive=ref(true)

    function reload(){
      isRouterAlive.value = false
      nextTick(()=>{
        isRouterAlive.value=true
      })
    }

    provide('reload', reload)
    return {
      isRouterAlive
    }
  }
}
</script>

<style>
p{
  margin: 0;
  padding: 0;
}
</style>
